﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>无标题文档</title>
<script src="js/da.js" type="text/javascript"></script>
<script src="js/daFx.js" type="text/javascript"></script>
<script src="js/daDrag.js" type="text/javascript"></script>
<script src="js/daWheel.js" type="text/javascript"></script>

<link href="daLoading/daLoading.css" rel="stylesheet"/>
<script src="daLoading/daLoading.js" type="text/javascript"></script>
<link href="daFrame/daFrame.css" rel="stylesheet"/>
<script src="daFrame/daFrame.js" type="text/javascript"></script>

<link href="daWin.css" rel="stylesheet"/>
<script src="daWin_min.js" type="text/javascript"></script>

<script language="javascript">
	window.onload =function(){
		//getNavigator();
		var dawin1 = daWin({
			width: "520px",
			height: "290px",
			title: function(){
				return '我的<span style="color:#f00">超级</span>自定义窗口！';
			},
//			url: "inside.html",
			url: "http://www.g.cn",
			
			before: function(a){
				adad = 100;
			},
			load: function(){
				//alert(this.dwSetting.load);
			},
			after: function(){
				
			}
		});
		
		var dawin2 = daWin({
			width: "<v300",
			height: "200",
			title: "淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网淘宝网",
			url: "http://www.taobao.com",
			status: "哈哈哈哈"
		});
		
		var dawin3 = daWin({
			width: "^",
			html: "你确定要删除吗？"
		});
		var dawin4 = daWin({
			width: "600",
			height: "300",
			type: "error",
			html: '佛说：菩提本无树，明镜亦非台，<br/>本来无一物，何处惹尘埃。爱是没长大却被溺坏的幸福。<br/>它总听甜言和蜜语，我却总不。它明明知道，<br/>我习惯了执意的生活态度，总是被隐不去的孩子<br/>气折磨得死去活来。倔强等待离别的风吹散两<br/>个人的思绪，等到慢慢远去的时候才回过神来，原来指尖和心头<br/>的牵挂变得紧绷起来，越吹越远，越远越紧。翻然悔悟心头的傲慢，上去容易，下来难。<br/>或随风继续远走，或迷恋尘世缠留他人枝头。<br/>已不能回到原点，却总想回到原点。'
			
		});
		var dawin5 = daWin({
			width: ">V",
			//type: "warn",
			button: {
				"全选": function( dwObj, evt ){
					dwObj.winReturn( {a:1,b:2,c:3} );
					//dawin5.close();
				}
			
			},
			html: '<img src="http://i.mmcdn.cn/simba/img/T1NuiaXkRbXXXXXXXX.gif?noq=y" />'
		});
		var dawin6 = daWin({
			width: ">V",
			type: "confirm",
			html: 'js事件动态绑定移除，兼容Firefox和IE（带注释）'
		});
		/**/
	}
</script>
</head>

<body>
<div style="WIDTH: 120; HEIGHT: 140; OVERFLOW: scroll; scrollbar-face-color: #FFFFFF; scrollbar-shadow-color: #D2E5F4; scrollbar-highlight-color: #D2E5F4; scrollbar-3dlight-color: #FFFFFF; scrollbar-darkshadow-color: #FFFFFF; scrollbar-track-color: #FFFFFF; scrollbar-arrow-color: #D2E5F4">
文字内容
</div>


<div>js事件动态绑定移除，兼容Firefox和IE（带注释）</div>
<div>2010年10月09日 星期六 19:30</div>
<table>
  <tbody>
    <tr>
      <td>
	  <iframe  style="width:100%; height:600px;" src="inside.html"></iframe>
	  
	  <div id="blog_text">&lt;script type=&quot;text/javascript&quot;&gt;<br />
        var   current;<br /><select name=""></select>
        var eventUtil = new Object();<br />
        //oTarget:目标 sEventType:事件名称   fnHandler:事件触发的函数名<br />
        //事件绑定<br />
        eventUtil.addEventHandler =   function(oTarget,sEventType,fnHandler){<br />
        //IE和FF的兼容性处理 <br />
        if(oTarget.addEventListener){//如果是FF<br />
??   
oTarget.addEventListener(sEventType,fnHandler,false);          <br />
        } else   if(oTarget.attachEvent){//如果是IE<br />
??   
oTarget.attachEvent('on'+sEventType,fnHandler);          <br />
        } else{<br />
??   
oTarget['on'+sEventType] =   fnHandler;          <br />
        }<br />
        };<br />
        //事件移除<br />
        eventUtil.removeEventHandler =   function(oTarget,sEventType,fnHandler) {<br />
        if(oTarget.removeEventListener)   {//如果是FF<br />
?? 
oTarget.removeEventListener(sEventType,fnHandler,false);          <br />
        }   else if (oTarget.detachEvent) {//如果是IE<br />
??   
oTarget.detachEvent('on'+sEventType,fnHandler);          <br />
        } else {<br />
??   
oTarget['on'+sEventType] = null;          <br />
        }<br />
        };<br />
        // 显示隐藏菜单<br />
        function   chengstate(menuid){<br />
        // 图片id<br />
        var imgId = 'menuimg_' + menuid;<br />
        //   菜单tr的id<br />
        var trId = 'item_' + menuid;<br />
        //顶级栏目tdID<br />
        var tdId = 'item' +   menuid;<br />
        var trObjt = document.getElementById(trId);<br />
        var tdObjt =   document.getElementById(tdId);<br />
        var imgObjt =   document.getElementById(imgId);<br />
        var curr;<br />
        if (trObjt.style.display ==   'none') {<br />
?? 
// 如果隐藏改为显示          <br />
?? 
trObjt.style.display = 'block';          <br />
??   
tdObjt.getElementsByTagName('a')[0].className = 'type';          <br />
?? 
imgObjt.src =   '          &lt;?php echo $this-&gt;baseUrl?&gt;/public/images/menu_reduce.gif';<br />
??   
//a标签添加onclick事件          <br />
?? 
var aList = trObjt.getElementsByTagName('a')          <br />
??   
for(i=0;i          &lt;aList.length;i++) {<br />
???   
eventUtil.addEventHandler(aList[i],'click',currentStyle);          <br />
?? 
}          <br />
        } else   {<br />
?? 
// 否则隐藏          <br />
?? 
trObjt.style.display = 'none';          <br />
??   
tdObjt.getElementsByTagName('a')[0].className = '';          <br />
?? 
imgObjt.src =   '          &lt;?php echo $this-&gt;baseUrl?&gt;/public/images/menu_add.gif';<br />
??   
//a标签移除onclick事件          <br />
?? 
var aList = trObjt.getElementsByTagName('a')          <br />
??   
for(i=0;i          &lt;aList.length;i++) {<br />
???   
eventUtil.removeEventHandler(aList[i],'click',currentStyle);          <br />
??   
}          <br />
        }<br />
        }<br />
        //给当前点击的a标签赋值class<br />
        function currentStyle(e) {<br />
        //var aEvent   = arguments[0];//取得event对象 这样也可以的<br />
        var aEvent = e || event;//取得event对象 <br />
        var   aTarget = aEvent.target || aEvent.srcElement;//获取Dom事件中事件最初指派到的元素。   IE是srcElement，Firefox是target<br />
        if(current) {<br />
?? 
current.className =   '';          <br />
        }<br />
        (current = aTarget).className =   'current';<br />
        }<br />
        &lt;/script&gt;<br />
      </div></td>
    </tr>
  </tbody>
</table>

</body>





		<!--<table class="tb_daWin" cellpadding="0" cellspacing="0">
			<tr>
				<td class="tl"></td>
				<td class="tl2"></td>
				<td class="top" style="width:768px;">
					<div style="position:relative; height:34px;">
						<div style="position:absolute; top:0px; width:643px; height:34px; background: url(images/overlight_top.png);"></div>
						<table style="width:100%; height:34px;" cellpadding="0" cellspacing="0">
							<tr>
								<td>选择客户信息</td>
								<td style="width:125px">
									<a href="javascript:void(0)" class="btmin"></a>
									<a href="javascript:void(0)" class="btmax"></a>
									<a href="javascript:void(0)" class="btclose"></a>
								</td>
							</tr>
						</table>
					</div>
				</td>
				<td class="tr2"></td>
				<td class="tr"></td>
			</tr>
			<tr>
				<td class="left"></td>
				<td class="mid" colspan="3">
					<iframe src="http://www.baidu.com" frameborder="0" scrolling="yes" style="width:800px; height:400px;"></iframe>
				</td>
				<td class="right"></td>
			</tr>
			<tr>
				<td class="bl"></td>
				<td class="bl2"></td>
				<td class="bottom" style="position:relative;">
					<div style="position:relative; height:32px;">
						<div style=" position:absolute; top:0px; width:643px; height:34px; background: url(images/overlight_bottom.png);"></div>
						<div>数据加载中…</div>
					</div>
				</td>
				<td class="br2"></td>
				<td class="br"></td>
			</tr>
		</table>-->

</html>









